IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[Consultant]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
   DROP TABLE [dbo].[Consultant]
GO

CREATE TABLE [dbo].[Consultant](
	[ID] [bigint] IDENTITY(1,1) NOT NULL,
	[Name] [varchar](50) NOT NULL,
	[Fees] [smallmoney] NOT NULL
) ON [PRIMARY]

GO

GRANT SELECT,INSERT,DELETE,UPDATE ON dbo.Consultant TO hms_usr
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id =
object_id(N'dbo.SP_GetConsultantFees') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
   DROP PROCEDURE dbo.SP_GetConsultantFees
GO


/*----------------------------------------------------------------------
'Created By : Swati
'Created On : 10/03/2008
'SP Name    : dbo.SP_GetConsultantFees
'Used In    : 
'------------------------------------------------------------------------
'Modification Log  
'------------------------------------------------------------------------
'Created By        Modified By         Remarks                             
'-----------       ------------        ----------------------------------
'                                                                          
'----------------------------------------------------------------------*/

CREATE PROCEDURE [dbo].[SP_GetConsultantFees]
AS
	SELECT
       [Name],
	   Fees
   FROM Consultant

GO

GRANT EXEC ON dbo.SP_GetConsultantFees TO hms_usr
GO
